
		.SYNTAX		2500


;	TEST PROGRAM FOR THE 6502 CROSS ASSEMBLER.

		.LINKLIST
		.BYTE
		.WORD

DDATA:		.EQUAL	ABH
ADDRESS:	.EQUAL	ABH 



LD:		LD	A,X
		LD	A,Y
		LD	X,A
		LD	Y,A
		LD	X,SP
		LD	SP,X

		LD	A,DDATA
		LD	X,DDATA
		LD	Y,DDATA

		LD	A,(ADDRESS)
		LD	A,(ADDRESS+X)
		LD	A,((ADDRESS+X))
		LD	A,((ADDRESS)+Y)
		LD	A,(ADDRESS)
		LD	A,(ADDRESS+X)
		LD	A,(ADDRESS+Y)

		LD	X,(ADDRESS)
		LD	X,(ADDRESS+Y)
		LD	X,(ADDRESS)
		LD	X,(ADDRESS+Y)

		LD	Y,(ADDRESS)
		LD	Y,(ADDRESS+X)
		LD	Y,(ADDRESS)
		LD	Y,(ADDRESS+X)

		LD	(ADDRESS),A
		LD	(ADDRESS+X),A
		LD	((ADDRESS+X)),A
		LD	((ADDRESS)+Y),A
		LD	(ADDRESS),A
		LD	(ADDRESS+X),A
		LD	(ADDRESS+Y),A

		LD	(ADDRESS),X
;	LD	(ADDRESS+Y),X
		LD	(ADDRESS),X

		LD	(ADDRESS),Y
;	LD	(ADDRESS+X),Y
		LD	(ADDRESS),Y


ADC:		ADC	A,DDATA
		ADC	A,(ADDRESS)
		ADC	A,(ADDRESS+X)
		ADC	A,((ADDRESS+X))
		ADC	A,((ADDRESS)+Y)
		ADC	A,(ADDRESS)
		ADC	A,(ADDRESS+X)
		ADC	A,(ADDRESS+Y)

		.BLKB	100H

AND:		AND	A,DDATA
		AND	A,(ADDRESS)
		AND	A,(ADDRESS+X)
		AND	A,((ADDRESS+X))
		AND	A,((ADDRESS)+Y)
		AND	A,(ADDRESS)
		AND	A,(ADDRESS+X)
		AND	A,(ADDRESS+Y)

CP:		CP	A,DDATA
		CP	X,DDATA
		CP	Y,DDATA
		CP	A,(ADDRESS)

;ADDRESS:	.EQUAL	$

		CP	X,(ADDRESS)
		CP	Y,(ADDRESS)
		CP	A,(ADDRESS+X)
		CP	A,((ADDRESS+X))
		CP	A,((ADDRESS)+Y)
		CP	A,(ADDRESS)
		CP	X,(ADDRESS)
		CP	Y,(ADDRESS)
		CP	A,(ADDRESS+X)
		CP	A,(ADDRESS+Y)

XOR:		XOR	A,DDATA
		XOR	A,(ADDRESS)
		XOR	A,(ADDRESS+X)
		XOR	A,((ADDRESS+X))
		XOR	A,((ADDRESS)+Y)
		XOR	A,(ADDRESS)
		XOR	A,(ADDRESS+X)
		XOR	A,(ADDRESS+Y)

OR:		OR	A,DDATA
		OR	A,(ADDRESS)
		OR	A,(ADDRESS+X)
		OR	A,((ADDRESS+X))
		OR	A,((ADDRESS)+Y)
		OR	A,(ADDRESS)
		OR	A,(ADDRESS+X)
		OR	A,(ADDRESS+Y)

SBC:		SBC	A,DDATA
		SBC	A,(ADDRESS)
		SBC	A,(ADDRESS+X)
		SBC	A,((ADDRESS+X))
		SBC	A,((ADDRESS)+Y)
		SBC	A,(ADDRESS)
		SBC	A,(ADDRESS+X)
		SBC	A,(ADDRESS+Y)

INC:		INC	X
		INC	Y
		INC	(ADDRESS)
		INC	(ADDRESS+X)
		INC	(ADDRESS)
		INC	(ADDRESS+X)

DEC:		DEC	X
		DEC	Y
		DEC	(ADDRESS)
		DEC	(ADDRESS+X)
		DEC	(ADDRESS)
		DEC	(ADDRESS+X)

ROL:		ROL	A
		ROL	(ADDRESS)
		ROL	(ADDRESS+X)
		ROL	(ADDRESS)
		ROL	(ADDRESS+X)

ROR:		ROR	A
		ROR	(ADDRESS)
		ROR	(ADDRESS+X)
		ROR	(ADDRESS)
		ROR	(ADDRESS+X)

ASL:		ASL	A
		ASL	(ADDRESS)
		ASL	(ADDRESS+X)
		ASL	(ADDRESS)
		ASL	(ADDRESS+X)

LSR:		LSR	A
		LSR	(ADDRESS)
		LSR	(ADDRESS+X)
		LSR	(ADDRESS)
		LSR	(ADDRESS+X)


BIT:		BIT	A,(ADDRESS)
		BIT	A,(ADDRESS)


JP:		JP	ADDRESS
		JP	(ADDRESS)

CALL:		CALL	ADDRESS

RET:		RET

POP:		POP	A
		POP	F

PUSH:		PUSH	A
		PUSH	F

EI:		EI

DI:		DI

RETI:		RETI

BRK:		BRK

CCF:		CCF

SCF:		SCF

CDF:		CDF

SDF:		SDF

CVF:		CVF

NOP:		NOP

JR:		JR	NC,12H
		JR	NC,JR

		JR	C,12H
		JR	C,JR

		JR	Z,12H
		JR	Z,JR

		JR	M,12H
		JR	M,JR

		JR	NZ,12H
		JR	NZ,JR

		JR	P,12H
		JR	P,JR

		JR	NOV,12H
		JR	NOV,JR

		JR	OV,12H
		JR	OV,JR

		INCLUDE mac.asm

		.END
